<!DOCTYPE html>
<html lang="zh"
	  xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
	  xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
<head>
	<meta charset="utf-8">
	<title>编辑班级</title>
	<link rel="stylesheet" th:href="@{/layui/css/layui.css}" href="../../../static/layui/css/layui.css" media="all" />
	<link rel="stylesheet" th:href="@{/css/public.css}" href="../../../static/css/public.css" media="all" />
</head>
<body class="childrenBody">
<form class="layui-form" style="width:80%;">
	<input type ="hidden" id="id" name="id" th:value="${bjxx.id}"/>
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">班级编号</label>
		<div class="layui-input-block" style="width: 50%">
			<input type="text" class="layui-input bjbh" lay-verify="bjbh" placeholder="请输入班级编号" th:value="${bjxx.bjbh}">
		</div>
	</div>
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">班级名称</label>
		<div class="layui-input-block" >
			<input type="text" class="layui-input name" lay-verify="required|name" placeholder="请输入班级名称" required th:value="${bjxx.name}">
		</div>
	</div>
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">简称</label>
		<div class="layui-input-block">
			<input type="text" class="layui-input short_name" lay-verify="" placeholder="请输入班级简称" th:value="${bjxx.short_name}">
		</div>
	</div>

	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">学校</label>
		<div class="layui-input-block" style="width: 50%">
			<select name="xxxxId" class="xxList" lay-filter="xxList"  lay-verify="required" id="xxxxId" required >
				<option value="">请选择学校</option>
				<!--<option value="1">测试在初中</option>-->
				<!--/*@thymesVar id="xxList" type="java.util.List<com.example.demo.information.entity.School>"*/-->
				<!--/*@thymesVar id="xx" type="com.example.demo.information.entity.School"*/-->
				<option th:each="xx,userStat:${xxList}" th:value="${xx.id}" th:text="${xx.name}" th:selected="${xx.id == bjxx.school.id}"></option>
			</select>
		</div>
	</div>
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label">年级</label>
		<div class="layui-input-block" style="width: 50%">
			<select name="njm" class="njm" lay-filter="njm"  lay-verify="required" id="njm" required >
				<option value="">请选择年级</option>
				<option th:each="entry:${njMap}" th:value="${entry.getKey()}" th:text="${entry.getValue()}" th:selected="${entry.key == bjxx.njm}"></option>
			</select>
		</div>
	</div>

	<div class="layui-form-item ">
		<label class="layui-form-label">班主任</label>
		<div class="layui-input-block" style="width: 50%">
			<input type="text" class="layui-input " lay-verify="required" required placeholder="请选择班主任" style="width: 50%;" id="bzr" readonly autocomplete="off"
			 th:value="${bjxx.bzr}">
			<input type="hidden" id="bzr_id" th:value="${bjxx.bzr_id}"/>
		</div>
	</div>
	<div class="layui-form-item layui-row layui-col-xs12">
		<div class="layui-input-block">
			<button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="addBjxx">立即保存</button>
			<button type="reset" class="layui-btn layui-btn-sm layui-btn-primary">取消</button>
		</div>
	</div>
</form>
<script type="text/javascript" th:src="@{/layui/layui.js}" src="../../../static/layui/layui.js"></script>
<script type="text/javascript" th:src="@{/js/bjxxAdd.js}" src="../../../static/js/bjxxAdd.js"></script>
</body>
</html>